#ifndef _SESSION_H
#define _SESSION_H

#include <boost/asio.hpp>
#include <string>
#include <list>


using boost::asio::ip::tcp;
using boost::asio::ip::udp;

class Session
{
	public:
        Session(tcp::socket* socket, std::size_t ID);
        Session(std::size_t ID);
        void Reset(tcp::socket* socket);
        void Reset(udp::socket* socket);
        void GetSocket(tcp::socket* socket);
        void GetSocket(udp::socket* socket);
        tcp::socket* GetTCPSocket();
        udp::socket* GetUDPSocket();
        udp::endpoint* GetEndPoint();
        void SetEndPoint(const udp::endpoint& endpoint);
        std::size_t GetID() const;
        boost::array<char*, 1>& GetBuffer();
        void SetBuffer(const boost::array<char*, 1>& buffer);
        boost::system::error_code GetErrorCode() const;
        void SetErrorCode(const boost::system::error_code& error);
        std::size_t GetBytesSize() const;
        void SetBytesSize(std::size_t size);
        bool GetActive() const;
        void SetActive(bool active);
	private:
        std::size_t IDSession;
        tcp::socket* mTCPSocket;
        udp::endpoint* mEndPoint;
        boost::system::error_code errorCode;
        bool isWrittingBuffer;
        boost::array<char*, 1> mBuffer;
        std::size_t bytes_transferred;
        bool isActive;
};

#endif
